/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 50728
 Source Host           : localhost:3306
 Source Schema         : third_data_center

 Target Server Type    : MySQL
 Target Server Version : 50728
 File Encoding         : 65001

 Date: 08/06/2021 22:09:38
*/

SET NAMES utf8mb4;
SET
FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for account_miner
-- ----------------------------
DROP TABLE IF EXISTS `account_miner`;
CREATE TABLE `account_miner`
(
    `miner_id`             int(11) NOT NULL AUTO_INCREMENT,
    `platform_miner_id`    varchar(100) COLLATE utf8mb4_bin          DEFAULT NULL COMMENT '在平台中框架id',
    `miner_name`           varchar(100) COLLATE utf8mb4_bin NOT NULL,
    `capacity`             int(11) DEFAULT NULL COMMENT '矿机算力（GB）',
    `miner_status`         tinyint(4) NOT NULL DEFAULT '1' COMMENT '矿机状态(1:在线,2:离线)',
    `platform_update_time` bigint(20) DEFAULT NULL COMMENT '平台更新时间',
    `miner_type`           varchar(10) COLLATE utf8mb4_bin           DEFAULT NULL COMMENT '矿池类型(chia、ar)',
    `account_id`           int(11) DEFAULT NULL COMMENT '账号id',
    `create_time`          datetime                         NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `update_time`          timestamp                        NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`miner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='矿机';

-- ----------------------------
-- Records of account_miner
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for account_share
-- ----------------------------
DROP TABLE IF EXISTS `account_share`;
CREATE TABLE `account_share`
(
    `share_id`    int(11) NOT NULL AUTO_INCREMENT,
    `share_type`  varchar(10) COLLATE utf8mb4_bin  DEFAULT NULL COMMENT '贡献类型（chia）',
    `deadline`    int(11) DEFAULT NULL,
    `height`      int(11) DEFAULT NULL,
    `miner_name`  varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
    `plotter_id`  varchar(30) COLLATE utf8mb4_bin  DEFAULT NULL,
    `ratio`       decimal(12, 9)                   DEFAULT NULL,
    `record_time` bigint(20) DEFAULT NULL,
    `account_id`  int(11) DEFAULT NULL,
    `create_time` datetime NOT NULL                DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (`share_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='账号贡献';

-- ----------------------------
-- Records of account_share
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for account_third
-- ----------------------------
DROP TABLE IF EXISTS `account_third`;
CREATE TABLE `account_third`
(
    `account_id`     int(11) NOT NULL AUTO_INCREMENT,
    `login_name`     varchar(100) COLLATE utf8mb4_bin NOT NULL,
    `password`       varchar(200) COLLATE utf8mb4_bin          DEFAULT NULL,
    `token`          varchar(1024) COLLATE utf8mb4_bin         DEFAULT NULL,
    `account_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '账号状态(1:有效,2:无效)',
    `platform`       varchar(100) COLLATE utf8mb4_bin          DEFAULT NULL COMMENT '账号所属平台',
    `create_time`    datetime                         NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `update_time`    timestamp                        NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of account_third
-- ----------------------------
-- BEGIN;
-- INSERT INTO `account_third`
-- VALUES (1, 'yangwoot@gmail.com', 'yang609355143',
--         'lang=zh; _ga=GA1.2.35167718.1622708416; MEIQIA_TRACK_ID=1tQjsq8NPT5g9OFLRT4mbsoTRhg; aliyungf_tc=68a3d384fbb48713033906c4c563cc77090aa0ded5cb42598a91ab92cd070e30; auth_token=eyJldCI6MTYyNDMyNzExNywiZ2lkIjo2NCwidWlkIjozNjc3NzZ9.SczdCcIQZ/TAcx2G5rhmE20VmCrq6qQYPgHmkd2ngoJaUh44ZbcFCWS0HZCI/JIHwHyDopxjBUDOaCgS8mY2Lw0yRvD+NvkFB4Tlkz1MGIf6HtYa/wZVzGOVAv7dDA8r+BaDq0E6JZFux16459zOr3UplEXAemYjcY3UeHpvLQck3IUNmKJknOPW9tlbzfPBf41QCYGUkgM3P/nm9TjSGFwKWBBQW4iZmVWIMv8ZPxYnxxcm04C8QgPXzDEif+ysxDug8PKNV5+2XsvQLdkGeaiWFIHro4O6fMjePNIR5OEGgnH7bhOFK7Vz7DblIav32tULpDlf1qEBsV6Y9UwZyw==',
--         1, 'hpool', '2021-06-08 15:05:18', '2021-06-08 22:08:23');
-- COMMIT;

-- ----------------------------
-- Table structure for block_chain_record
-- ----------------------------
DROP TABLE IF EXISTS `block_chain_record`;
CREATE TABLE `block_chain_record`
(
    `record_id`      int(11) NOT NULL AUTO_INCREMENT,
    `block_chain_id` varchar(30) COLLATE utf8mb4_bin DEFAULT NULL,
    `netspace`       decimal(40, 0)                  DEFAULT NULL COMMENT '单位(B)',
    `difficulty`     int(11) DEFAULT NULL,
    `unique_coins`   int(11) DEFAULT NULL,
    `supply`         decimal(40, 0)                  DEFAULT NULL COMMENT '单位(B)',
    `address_count`  int(11) DEFAULT NULL,
    `price`          decimal(20, 8)                  DEFAULT NULL,
    `average_fees`   decimal(20, 11)                 DEFAULT NULL,
    `power`          int(11) DEFAULT NULL,
    `create_time`    datetime NOT NULL               DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (`record_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='区块链总计';

-- ----------------------------
-- Records of block_chain_record
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for mining_record
-- ----------------------------
DROP TABLE IF EXISTS `mining_record`;
CREATE TABLE `mining_record`
(
    `record_id`   int(11) NOT NULL AUTO_INCREMENT,
    `amount`      decimal(20, 8) NOT NULL         DEFAULT '0.00000000',
    `mining_coin` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL,
    `mining_name` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL,
    `mining_type` varchar(20) COLLATE utf8mb4_bin DEFAULT NULL,
    `record_time` bigint(20) DEFAULT NULL,
    `account_id`  int(11) DEFAULT NULL,
    `create_time` datetime       NOT NULL         DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (`record_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='收益记录';

-- ----------------------------
-- Records of mining_record
-- ----------------------------
BEGIN;
COMMIT;

SET
FOREIGN_KEY_CHECKS = 1;
